import React from 'react';
import '../assets/less/item.less';

class TodoItem extends React.Component {
	
	render() {
		return (
			<div className='todo-item'>
				<span className="input-wrap">
					<input type="checkbox" checked={this.props.completed} onChange={this.props.toogleItem} />
				</span>
				<span className="text">{this.props.text}</span>
				<span className='delete' onClick={this.props.onDelete}>X</span>
			</div>
		)
	}
}

export default TodoItem;